<?php
class contExample extends coreController
{
    public function index()
    {
        $aParam = array(
            'user_id' => ''
        );
        
        $validator = utilValidator::getInstance();
        $validator->initialize($aParam);
        
        $validator->setRequireErrorMsg('user_id', '아이디값이 없습니다.');
        
        $aResult = $validator->inspection(array(
            array(
                'id' => 'user_id',
                'label' => '아이디',
                'filter' => 'isFill'
            )
        ));
        
        var_dump($aResult);
        
        /*
        $aParam = array(
            'user_id' => 'tony',
            'user_pass' => 'abcd1234',
            'user_pass_confirm' => 'abcd1234',
            'user_email' => 'foo@foo',
            'user_regex' => 'abcd'
        );
        
        $validator = utilValidator::getInstance();
        
        $validator->initialize($aParam);
        
        $aParamValidator = array(
            array(
                'id' => 'user_id',
                'label' => '아이디',
                'filter' => 'isFill&isIdentity'
            ),
            array(
                'id' => 'user_pass',
                'label' => '비밀번호',
                'filter' => 'isFill&isMin[4]&isMax[20]'
            ),
            array(
                'id' => 'user_pass_confirm',
                'label' => '비밀번호확인',
                'filter' => 'isFill&isMin[4]&isMax[20]&isMatch[user_pass]'
            ),
            array(
                'id' => 'user_email',
                'label' => '이메일',
                'filter' => 'isFill&isEmail'
            ),
            array(
                'id' => 'user_regex',
                'label' => '정규식',
                'filter' => '/^a/i',
                'msg' => '정규식이 잘못되었습니다.'
            )
        );
        
        $aResult = $validator->inspection($aParamValidator);
        
        echo '<pre>';
        var_dump($aResult);
        */
        
        /*
        $sEditer = utilWebeditor::driver()->load(array(
            'id' => 'contents',
            'contents' => '여기는 내용이 들어갑니다.',
            'height' => 400
        ));
        
        echo $sEditer;
        */
    }
}